import request from '@/utils/request'

// 创建质检单明细
export function createQcOrderDetail(data) {
  return request({
    url: '/hs/qc-order-detail/create',
    method: 'post',
    data: data
  })
}

// 更新质检单明细
export function updateQcOrderDetail(data) {
  return request({
    url: '/hs/qc-order-detail/update',
    method: 'put',
    data: data
  })
}

// 删除质检单明细
export function deleteQcOrderDetail(id) {
  return request({
    url: '/hs/qc-order-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得质检单明细
export function getQcOrderDetail(id) {
  return request({
    url: '/hs/qc-order-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得质检单明细分页
export function getQcOrderDetailPage(params) {
  return request({
    url: '/hs/qc-order-detail/page',
    method: 'get',
    params
  })
}
// 导出质检单明细 Excel
export function exportQcOrderDetailExcel(params) {
  return request({
    url: '/hs/qc-order-detail/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}